package com.gopay.common.user.manager.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.gopay.common.domain.cauth.CAuthRoleInfo;

import com.gopay.common.user.dao.RoleInfoDAO;
import com.gopay.common.user.manager.RoleInfoManager;

/**
 * 角色Manager实现
 * 
 * @RoleInfoManagerImpl.java
 * @author yaobo
 * @2013-8-8 下午04:21:46 www.gopay.com.cn Inc.All rights reserved.
 */
@Service("roleInfoManager")
public class RoleInfoManagerImpl implements RoleInfoManager {

    @Resource(name = "roleInfoDao")
    private RoleInfoDAO roleInfoDao;

    @Override
    public String getRoleName(String roleId) {
        CAuthRoleInfo role = roleInfoDao.find(CAuthRoleInfo.class, roleId);

        if (role != null) {
            return role.getRoleName();
        }

        return "";
    }

}
